<template>
  <div class="app-container">
    <el-table :data="delvList">
      <el-table-column type="selection" width="55" align="center" />

      <el-table-column label="供应商名称" align="center" prop="supCode" />
      <el-table-column label="投标状态" align="center" prop="delvStatus" />
      <el-table-column
        label="递交时间"
        align="center"
        prop="delvCreateTime"
        width="180"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.delvCreateTime, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>

      <el-table-column label="投递附件" align="center" prop="filePath" />
      <el-table-column
        label="操作"
        align="center"
        class-name="small-padding fixed-width"
      >
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['purs:delv:edit']"
            >修改</el-button
          >
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
  </div>
</template>

<script>
import {
  listDelv,
  getDelv,
  delDelv,
  addDelv,
  updateDelv,
} from "@/api/purs/delv";

export default {
  name: "Delv",
  data() {
    return {
      total: 0,
      // 投递标书表格数据
      delvList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
      },
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询投递标书列表 */
    getList() {
      this.loading = true;
      listDelv(this.queryParams).then((response) => {
        this.delvList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
  },
};
</script>
